#!/bin/bash
set -e

sudo rm -rf /home/${USER}/.cache/* /home/${USER}/.ros/* /var/cache/* /var/log/* /tmp/*

sudo rsync -axHAWX \
    --numeric-ids --info=progress2 \
    --exclude={"/dev/","/proc/","/sys/","/run/","/mnt/","/media/*","/lost+found"} \
    / /mnt
